﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;

namespace DefeatEpidemic.Models
{
    public class Member
    {
        public Guid id { get; set; } = Guid.NewGuid();
        /// <summary>
        /// 姓名
        /// </summary>
        [Display(Name = "姓名")]
        public string name { get; set; }
        /// <summary>
        /// 身份证号
        /// </summary>
        [Display(Name = "身份证号")]
        public string idcard { get; set; }
        /// <summary>
        /// 住址
        /// </summary>
        [Display(Name = "住址")]
        public string address { get; set; }
        /// <summary>
        /// 手机
        /// </summary>
        [Display(Name = "手机")]
        public string mobile { get; set; }
        /// <summary>
        /// 邮箱
        /// </summary>
        [Display(Name = "邮箱")]
        public string email { get; set; }
        /// <summary>
        /// 单位名称
        /// </summary>
        [Display(Name = "单位名称")]
        public string companyName { get; set; }
        /// <summary>
        /// 上班地点
        /// </summary>
        [Display(Name = "上班地点")]
        public string companyPlace { get; set; }

        /// <summary>
        /// 车牌号
        /// </summary>
        [Display(Name="车牌号")]
        public string carNumber { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        [Display(Name = "创建时间")]
        public DateTime created_at { get; set; } = DateTime.Now;
        /// <summary>
        /// 更新时间
        /// </summary>
        [Display(Name = "更新时间")]
        public DateTime updated_at { get; set; } = DateTime.Now;
        /// <summary>
        /// 备注
        /// </summary>
        [Display(Name = "备注")]
        public string remark { get; set; }

        /// <summary>
        /// 角色，1-业主，2-物管人员
        /// </summary>
        public int role_type { get; set; } = 1;

        public virtual Family family { get; set; }

        public virtual Community community { get; set; }

        public ICollection<Application> applications { get; set; }

        public ICollection<Car> cars { get; set; }

        public ICollection<Resource> resources { get; set; }

        public ICollection<CheckRecord> checkRecords { get; set; }
    }
}
